import React from 'react'
import ReactDOM from 'react-dom/client'
const root = ReactDOM.createRoot(document.getElementById('root'))

class Hello extends React.Component {
  state = {
    count: 10,
    age: 18,
  }
  handleClick() {
    console.log('你点击了第二个按钮')
  }
  render() {
    return (
      <>
        <button
          onClick={() => {
            console.log('你点击了')
          }}
        >
          点击我
        </button>
        <button onClick={this.handleClick}>点击我2</button>
      </>
    )
  }
}
root.render(
  <>
    <Hello></Hello>
  </>
)
